<template>
  <div>
    {{$store.state.count}}
    <br>
    <!-- <button @click="$store.commit('setCount', 666)">set count</button> -->
    <button @click="setCount(777)">set count</button>
  </div>
</template>

<script>
import { mapMutations } from "vuex"
export default {
  methods: {
    ...mapMutations(['setCount'])
    // setCount(data) {
    //   this.$store.commit('setCount', data)
    // }
  }
}
</script>

<style>

</style>